package com.asianrapid.service.impl.sys;

import com.asianrapid.dao.CarDao;
import com.asianrapid.model.sys.CarEntity;
import com.asianrapid.service.sys.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service("CarServiceImpl")
public class CarServiceImpl implements CarService{
    @Autowired
    private CarDao carDao;




//    @Override
//    public List<CarEntity> carList(int id, int pageSize, int start) {
//        return carDao.carList( id,  pageSize,  start);
//    }
//
//    @Override
//    public int carSize(int id, int pageSize, int start) {
//        return carDao.carSize(id, pageSize, start);
//    }

    @Override
    public List<CarEntity> carList( int pageSize, int start) {
        int state = 0;
        return carDao.carList( pageSize,  start, state);
    }

    @Override
    public int carSize( int pageSize, int start) {
        int state = 0;
        return carDao.carSize( pageSize, start, state);
    }


    @Override
    public void insertCar(CarEntity carEntity) {
        carEntity.setState(0);
        carDao.insertCar(carEntity);
    }


    @Override
    public void updateCar(CarEntity carEntity) {

        carDao.updateCar(carEntity);
    }

    @Override
    public void deleteCar(List<String> groupId) {

        carDao.deleteCar(groupId);
    }
}
